package com.alex.utils.search;

import java.util.List;

public class SearchResults {

	private List<Document> documents;

	private boolean hasNextPage;

	public SearchResults(List<Document> documents, boolean hasNextPage) {
		this.documents = documents;
		this.hasNextPage = hasNextPage;
	}
	
	public List<Document> getDocuments() {
		return documents;
	}
	
	public boolean hasNextPage() {
		return hasNextPage;
	}

	public static class Document {

		private String url;

		public Document(String url) {
			this.url = url;
		}

		public String getUrl() {
			return url;
		}

		public void setUrl(String url) {
			this.url = url;
		}

		@Override
		public int hashCode() {
			return url.hashCode();
		}

		@Override
		public boolean equals(Object obj) {
			return ((Document) obj).url.equals(url);
		}

		@Override
		public String toString() {
			return url;
		}
	}
}
